package com.syni.mdd.yhd.common.all.enums.platformGood;

import com.syni.mdd.sjb.common.component.utils.common.enums.ReturnEnums;
import com.syni.mdd.yhd.common.all.constants.ResultCode;

/**
 * @className platformGood
 * @description TOO
 * @Author cfx
 * @DATE 2020/3/12 15:25
 * @VERSION 1.0
 **/
public enum PlatformGoodEnum implements ReturnEnums {
    PLATFORM_GOOD_NO_EXIST("平台商品不存在", ResultCode.CODE_ERROR_05),
    PLATFORM_GOOD_TODAY_BUY("一天只能购买一次", ResultCode.CODE_PLATFORM_GOOD_TODAY_BUY),
    PLATFORM_GOOD_BUY_LIMIT("超过购买限制", ResultCode.CODE_PLATFORM_GOOD_BUY_LIMIT),
    CODE_PLATFORM_GOOD_SELL_FIN("已售罄", ResultCode.CODE_PLATFORM_GOOD_SELL_FIN),
    PLATFORM_GOOD_IS_OFF("商品已下架",ResultCode.CODE_PLATFORM_GOOD_IS_OFF),
    PLATFORM_GOOD_INV_NO("库存不足",ResultCode.CODE_PLATFORM_GOOD_INV_NO),
    PLATFORM_GOOD_BUY_MAX("您已达购买上限",ResultCode.CODE_PLATFORM_GOOD_BUY_MAX);
    private String desc;
    private String returnCode;

    PlatformGoodEnum(String desc, String returnCode) {
        this.desc = desc;
        this.returnCode = returnCode;
    }

    @Override
    public String getCode() {
        return this.returnCode;
    }

    @Override
    public String getMsg() {
        return this.desc;
    }
}
